import { BasicPageParams } from './baseModel'

export interface PddProductModel {
  id: number
  storeId: number
  goodsId: string
  goodsSign: string
  goodsName: string
  goodsDesc: string
  goodsCategory: string
  goodsThumbnailUrl: string
  mallId: string
  mallName: string
  mallType: number
  brandName: string
  commissionsRate: number
  groupPrice: number
  normalPrice: number
  salesCount: number
  promotionStatus: number
  promotionStartedAt: string
  promotionEndedAt: string
  reportingStatus: number
  reportingImgs: string
  reportingVideoUrl: string
  reportingQualifications: string
  reportingComment: string
  createdAt: string
  createdBy: number
  editedAt: string
  editedBy: number
  editedName: string
  goodsRemark: string
}

export type PddMallListModel = Pick<PddProductModel, 'mallId' | 'mallName'>
export interface PddOrderSettledListParams extends BasicPageParams {
  orderNo?: string
  goodsId?: string
  mallId?: string
  orderStatus?: 4 | 5
  platformType?: 2 | 3 | 4
  startDate?: string
  endDate?: string
}

export interface PddOrderSettledListModel {
  orderNo: string
  mallId: string
  goodsId: string
  platformType: 2 | 3 | 4
  orderStatus: 4 | 5
  id: string
  storeId: number
  mallName: string
  goodsName: string
  goodsPrice: number
  goodsQuantity: number
  goodsThumbnailUrl: string
  settledAt: string
  settledAmount: number
  platformAmount: number
}

export interface PddCommissionPaymentListParams extends BasicPageParams {
  accountNumber?: string
  orderNo?: string
  startDate?: string
  endDate?: string
}

export interface PddCommissionPaymentListModel {
  id: number
  storeId: number
  orderNo: string
  settlementStart: string
  settlementEnd: string
  settlementAmount: number
  paymentDate: string | null
  bankAccountType: string | null
  accountBank: string | null
  accountName: string
  bankBranchName: string | null
  accountNumber: string | null
  bankProvince: string | null
  bankCity: string | null
  paymentStatus: number
  auditorId: number | null
  auditedAt: string | null
  createdAt: string | null
  remarks: string | null
  certificateUrls: string[]
  delFlag: number
  storeName: string | null
  settlementCycle: string
  paymentStatusStr: string | null
}

export interface PddFundParams {
  platform: 0 | 1
}

export interface PddFundModel {
  returnedCommissions: number
  settledBalanceAmount: number
  waitingAmount: number
  settledAmount: number
}

export interface PddCommissionSettlementLisParams extends BasicPageParams {
  platformType?: 0 | 1
  startDate?: string
  endDate?: string
  storeId?: number
  storeName?: number
}

export interface PddCommissionSettlementListModel {
  id: number
  storeId: number
  settlementParty: number
  incomingAmount: number
  incomingOrderCount: number
  reportDate: string
  createdTime: string
  storeName: string | null
  allIncomingAmount: number
  allIncomingOrderCount: number
}

export interface PddSettlement {
  id: number
  storeId: number
  bankAccountType: number
  accountBank: string
  accountName: string
  bankProvince: string
  bankCity: string
  bankAddressCode: string
  accountNumber: string
  createdAt: string
  bankStatus: number
  bankBranchId: string
  bankBranchName: string
  applymentStatus: number
  auditedBatch: string
  qualificationId: number
  pddSettlement: number
}

export interface PddSettlementParams {
  storeId: number
}

export interface PddCommissionPaymentParams {
  id: number
  storeId: number
  bankAccountType: number
  accountBank: string
  accountName: string
  bankBranchName: string
  accountNumber: string
  bankProvince: string
  bankCity: string
  remarks: string
  certificateUrls: string[]
}

export interface PddAccountBankListModel {
  accountNumber: string
  accountBank: string
}
export interface PddOrderListParams extends BasicPageParams {
  orderNo?: string
  goodsInfo?: string
  mallId?: string
  orderStatus?: 0 | 1 | 2 | 3 | 4 | 5 | 10
  uploadStatus?: 0 | 1
  orderScene?: number
  accountCode?: string
  adgroupId?: string
  adcreativeId?: string
  linkId?: string
  platformType?: 2 | 3 | 4
  timeType?: 1 | 2 | 3 | 4
  startTime?: string
  endTime?: string
}
export interface PddOrderListModel {
  id: string
  storeId: number
  storePid: string
  orderNo: string
  mallId: string
  mallName: string
  goodsId: string
  goodsName: string
  goodsPrice: number
  goodsQuantity: number
  goodsThumbnailUrl: string
  linkId: string
  platformType: 2 | 3 | 4
  createdAt: string
  payTime: string
  groupTime: string
  receiveTime: string
  settleTime: string
  totalPay: number
  orderStatus: 0 | 1 | 2 | 3 | 4 | 5 | 10
  orderScene: number
  groupId: string
  platformDiscount: number
  commissionsRate: number
  commissionsAmount: number
  accountCode: string
  adgroupId: string
  adcreativeId: string
  adgroupVid: string
  isShow: 0 | 1
  uploadStatus: 0 | 1
  nativeSettleTime: string
  settleStatus: number
  platformCommissionsRate: number
}
